package com.hy.springboot.config;

import com.hy.springboot.service.TestService;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;

/**
 * Created With IntelliJ IDEA.
 * Descriptions:
 * author: Mr.Du
 * Date: 2023/5/30
 * Time: 23:14
 */
@AutoConfiguration
@ConditionalOnProperty(prefix = "hy.starter", name = "enabled", havingValue = "true")
public class TestAutoConfiguration {

    @Bean
    public TestService testService(){
        return new TestService();
    }
}

